__author__ = 'sha66y'

from plotSpread import *

# CORN_SPREADS = [['CME/CZ', 'CME/CU'],
#                 ['CME/CZ', 'CME/CN']]

CORN_SPREADS = [["CME/CK", "CME/CZ"],
                ["CME/CZ", "CME/CN"],
                ["CME/CZ", "CME/CU"],
                ["CME/CN", "CME/CU"]]

WHEAT_SPREADS = [["CME/WK", "CME/WU"],
                 ["CME/WZ", "CME/WN"],
                 ["CME/WN", "CME/WH"],
                 ["CME/WN", "CME/WK"],
                 ["CME/WZ", "CME/WK"],
                 ["CME/WN", "CME/WH"]]

#for item in CORN_SPREADS:
for item in WHEAT_SPREADS:
    test = getSpreadStat(item[0], item[1], 1985, 2005)
    # print test
    #
    # tmp = getSpreadStat(item[0], item[1], 1999, 2014)
    #
    # test['last'] = tmp['scale']
    # print test
    test.plot(y = ['scale'])
    plt.title(item[0] + ' ' + item[1])
    plt.show()
